Re: Images in Database - Mailing list pgsql-novice

From M. Bastin
Subject Re: Images in Database
Date
Msg-id a0602041bbc8be4f1284d@[192.168.0.101]
Whole thread Raw
In response to Re: Images in Database  (Reshat Sabiq <sabiq@purdue.edu>)
List pgsql-novice
At 5:33 PM -0600 3/27/04, Reshat Sabiq wrote:
>Valid point. Maintenance might be easier (although i don't think you
>can dump and move images easily to another DB;

Yes you can with COPY or pg_dump.

>  you'd probably have to do some kind of direct connection to another
>DB to move them). When in a filesystem, you could bzip everything,
>and move them easily. There could also be an URL-prefix field for
>each client, followed by a URL suffix field for each image. Thus
>maintenance most of the time would be as easy as changing the prefix.

Like you say: "most of the time" and of course you'll run into the
other situations sooner or later...

>However, no matter how small an image is, it takes the same amount
>of BLOB space, doesn't it. This, IMHO, means a lot of wasted storage.

There is no wasted storage.  You'll use up as much disk space whether
you store separate files or whether you put those bytes inside the
database.  There's no minimum size for bytea data.

>  Not sure if that also affects performance to some small degree.

Nope, your searches are done on indexes (which don't contain the image data).

Marc

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Images in Database
Next
From: Roberto Rezende de Assis
Date:
Subject: Doubt on foreign key and deletions